package services;

import java.util.List;

import javax.inject.Inject;

import mappers.UserMapper;
import models.Friend;
import models.User;

public class UserService {
    @Inject
    public UserMapper userMapper;
    
    public List selectAll() {
        List<User> users = userMapper.selectAll();
        return users;
    }
    
    public User getUserByUsername(String username) {
        return userMapper.getUserByUsername(username);
    }
    
    public User getUserByUserId(int user_id) {
        return userMapper.getUserByUserId(user_id);
    }
    
    public List<User> getFriendsByUsername(String username) {
        return userMapper.getFriendsByUsername(username);
    }
    
    public List<User> getFriendsByUserId(int user_id) {
        return userMapper.getFriendsByUserId(user_id);
    }

	public List<User> getFriendsByNumber(User fri) {
		return userMapper.getFriendsByNumber(fri);
	}

	public void updateRelationship(User user) {
		userMapper.updateRelationship(user);
		
	}
    
}
